<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>

    let person = {
        name:"张三",
        age:23,
        eat:function (food){
            alert("吃"+food);
        }
    };
    person.eat("火龙果");


    var person = {
        name : "zhangsan",
        age : 23,
        eat: function (){
            alert("干饭~");
        }

    };


    alert(person.name);
    alert(person.age);

    person.eat();



</script>
</body>
</html>